Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #myDIV { width: 500px; background-color: lightblue; overflow: auto; border: 1px solid black; -webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */ animation: mymove 5s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes mymove { 50% {max-height: 100px;} } /* Standard syntax */ @keyframes mymove { 50% {max-height: 100px;} } </style> </head> <body> <p>Change the max-height, from "none" to "100px" and back to "none":<p> <div id="myDIV"> <p>This DIV element does not have a pre-defined height.</p> <p>An animation will change the max-height, from "none" to "100px".</p> <p>The height of this DIV element will not exceed 100 pixels.</p> </div> <p>The max-height property is <em>animatable</em> in CSS.</p> <p><b>Note:</b> Currently the max-height property is not changing <em>gradually</em> in Chrome, and does not change at all in Firefox.</p> <p><b>Note:</b> CSS Animations do not work in Internet Explorer 9 and earlier versions.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_anim_max-height by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:52:40 GMT --> </html>
Result:
Try it Yourself - © w3schools.com